package com.sztx.pay.center.core.service.bean;

import java.io.Serializable;

/**
 * 
 * @ClassName: MutiKey
 * @Description: 复合主键
 * @author jsu
 * @date 2015年1月26日 上午10:31:43
 *
 */
public class MutiKey implements Serializable {

	private static final long serialVersionUID = 1L;

	private int key;
	
	private String date;
	
	public MutiKey(int key, String date) {
		this.key = key;
		this.date = date;
	}

	public MutiKey() {}
	
	/**
	 * @return the key
	 */
	public int getKey() {
		return key;
	}

	/**
	 * @param key the key to set
	 */
	public void setKey(int key) {
		this.key = key;
	}

	/**
	 * @return the date
	 */
	public String getDate() {
		return date;
	}

	/**
	 * @param date the date to set
	 */
	public void setDate(String date) {
		this.date = date;
	}

	/**
	 * (non-Javadoc)
	 * <p>Title: hashCode</p>
	 * <p>Description: </p>
	 * @return
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((date == null) ? 0 : date.hashCode());
		result = prime * result + key;
		return result;
	}

	/**
	 * (non-Javadoc)
	 * <p>Title: equals</p>
	 * <p>Description: </p>
	 * @param obj
	 * @return
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		MutiKey other = (MutiKey) obj;
		if (date == null) {
			if (other.date != null)
				return false;
		} else if (!date.equals(other.date))
			return false;
		if (key != other.key)
			return false;
		return true;
	}
	
}
